//==============================================================================
//
//  File        : mmpf_task_cfg.h
//  Description : Task configuration file for A-I-T MMPF source code
//  Author      : Philip Lin
//  Revision    : 1.0
//
//==============================================================================

#ifndef _MMPF_TASK_CFG_H_
#define _MMPF_TASK_CFG_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

//#define     DEBUG

//==============================================================================
//
//                              CONSTANTS
//
//==============================================================================
#if DRAM_SIZE <= 2
#define TASK_SYS_STK_SIZE       (1024/4) //Task prio: 1  Usage:  628 bytes
#define MP4VENC_STK_SIZE        (384 /2) //Task prio: 2  Usage:  192 bytes
#define VIDMGR_STK_SIZE         (384 /4) //Task prio: 3  Usage:  192 bytes
#define USB_STK_SIZE            (4096*4)//(1280/2) //Task prio: 4  Usage:  948 bytes
#if (SUPPORT_MP4) || (SUPPORT_MTS)
#define AUDIO_RECORD_STK_SIZE   (4096) //Task prio: 6  Usage:  540 bytes
#else
#define AUDIO_RECORD_STK_SIZE   (1280/4) //Task prio: 6  Usage:  540 bytes
#endif
#define TASK_SENSOR_STK_SIZE    (768 /2) //Task prio:12  Usage:  588 bytes
#define TASK_PCAM_STK_SIZE      (1024/4) //Task prio:29  Usage:  588 bytes
#if WATCHDOG_RESET_EN
#define LTASK_STK_SIZE          (128)
#endif
#if SUPPORT_AIT845x_MD
#define AIT845xMD_STK_SIZE      (1024/2)
#endif
#if UART_RXINT_MODE_EN
#define TASK_JOB_DISPATCH_STK_SIZE (256)
#endif

#else
#define TASK_SYS_STK_SIZE       (1024)//(3072)
#define TASK_DSC_STK_SIZE       (512)
#define LTASK_STK_SIZE          (128)
#define TASK_SENSOR_STK_SIZE    (192)//(384)

#define TASK_FDTC_STK_SIZE      (768)
#define TASK_STK_SIZE           (128)       // 128 x4 Bytes
#define PLAYER_STK_SIZE       	(1024) // Stack size in DW (106)
#define DECODER_STK_SIZE      	(4096) // Stack size in DW (106)
#define DEMUXER_STK_SIZE      	(4096) // Stack size in DW (298)
#define MP4VENC_STK_SIZE        (384)       // 384 x4 Bytes
#define VIDMGR_STK_SIZE         (512)      // 512 x4 Bytes
#if (MP3HD_P_EN == 1)
#define AUDIO_PLAY_STK_SIZE     (5120)
#else
#define AUDIO_PLAY_STK_SIZE     (4096)
#endif
#define AUDIO_RECORD_STK_SIZE    	(4096)
#define USB_STK_SIZE                (2400/*2300*/) // (3072)  // 3072 x4 Bytes , sean@2010_01_11 change to 2048 
#define FS_STK_SIZE                 (1024)  // alterman 1024 x4 Bytes ||// 512 x4 Bytes
#define TASK_PCAM_STK_SIZE          (2048)
#endif

enum {
    TASK_SYS_PRIO = 1,
    TASK_MP4VENC_PRIO = 2,
    TASK_VIDMGR_PRIO = 3,
    TASK_USB_PRIO = 4,
    //Timer Task in OS use priority 5 !!!
#if (SUPPORT_MP4) || (SUPPORT_MTS)
    TASK_AUDIO_PLAY_PRIO = 6 ,
    TASK_3GPPARSR_PRIO = 7,
    TASK_VIDDEC_PRIO = 8,
    TASK_VIDPLAY_PRIO = 9,
    TASK_DSC_PRIO = 10,
    TASK_SENSOR_PRIO = 11,
    TASK_AUDIO_RECORD_PRIO = 12,
#else
    TASK_AUDIO_RECORD_PRIO = 6,
    TASK_AUDIO_PLAY_PRIO = 7 ,
    TASK_3GPPARSR_PRIO = 8,
    TASK_VIDDEC_PRIO = 9,
    TASK_VIDPLAY_PRIO = 10,
    TASK_DSC_PRIO = 11,
    TASK_SENSOR_PRIO = 12,
#endif    
    TASK_APP_PRIO = 13,
    TASK_AUDIO_WRITEFILE_PRIO = 14,
    TASK_FS_PRIO = 15,
    TASK_FDTC_PRIO = 16,
    TASK_PCAM_PRIO = 29,
    TASK_AIT845xMD_PRIO = 55,
    TASK_CE_JOB_DISPATCH_PRIO = 59
} ;

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _MMPF_TASK_CFG_H_ */
